const WxParse = require('../../wxParse/wxParse.js')

Page({
    data: {
        title: ''
    },
    onLoad() {
        wx.showLoading({
            title: '加载中'
        })

        wx.showShareMenu({
            withShareTicket: true
        })

        wx.request({
            url: 'https://www.kelionline.com/api/miniProgram/mnm/introduction',
            method: 'GET',
            success: res => {
                if (res.data.code == 0) {
                    wx.hideLoading()

                    this.setData({
                        title: res.data.data.title
                    })
                    
                    const article = res.data.data.content
                    WxParse.wxParse('article', 'html', article, this)
                }
            }
        })
    }
})